python="/usr/bin/python2.7"
user_rating_file="/home/lili/project/recommend/ll_newscms/public/data/rating.txt"
train_file="/home/lili/project/recommend/ll_newscms/public/data/Item2Vec/train_data.txt"
item_vec_file="/home/lili/project/recommend/ll_newscms/public/data/Item2Vec/item_vec.txt"
item_sim_file="/home/lili/project/recommend/ll_newscms/public/data/Item2Vec/sim_result.txt"


produce_train_data="/home/lili/project/recommend/pyrcd/personal_recommendation/Item2Vec/production/produce_train_data.py"
train_sh="/home/lili/project/recommend/pyrcd/personal_recommendation/Item2Vec/production/train.sh"



#生成训练原始数据
if [ -f $user_rating_file ]; then
    $python $produce_train_data $user_rating_file $train_file
else
    echo "no rating file"
    exit
fi
#训练生成item向量文件
if [ -f $train_file ]; then
    sh $train_sh $train_file $item_vec_file
else
    echo "no train file"
    exit
fi
#if [ -f $item_vec_file ]; then
#    $python produce_item_sim.py $item_vec_file $item_sim_file
#else
#    echo "no item vec file"
#    exit
#fi